// Update with your config settings.

module.exports = {

  development: {
    client: 'pg',
    connection: {
      host: '127.0.0.1',
      user: 'postgres',
      password: '123456',
      database: 'chat',
    },
    debug: true, // 指明是否开启debug模式，默认为true表示开启
    acquireConnectionTimeout: 20000, // 指明连接计时器大小，默认为60000ms
    // 其他高级配置参考https://www.mchweb.net/a/126.html
    migrations: {
      // extension: 'ts',
      tableName: 'knex_migrations',
      directory: './migrations',
    },
    seeds: {
      // extension: 'ts',
      directory: './seeds/dev',
    },
  },

  test: {
    client: 'postgresql',
    connection: {
      host: '127.0.0.1',
      user: 'postgres',
      password: '123456',
      database: 'chat',
    },
    pool: {
      min: 2,
      max: 20,
    },
    acquireConnectionTimeout: 20000, // 指明连接计时器大小，默认为60000ms
    migrations: {
      // extension: 'ts',
      tableName: 'knex_migrations',
    },
    seeds: {
      // extension: 'ts',
      directory: './seeds/test',
    },
  },

  production: {
    client: 'pg',
    connection: {
      host: '127.0.0.1',
      user: 'postgres',
      password: '123456',
      database: 'chat',
    },
    pool: {
      min: 2,
      max: 20,
    },
    acquireConnectionTimeout: 20000, // 指明连接计时器大小，默认为60000ms
    migrations: {
      // extension: 'ts',
      tableName: 'knex_migrations',
    },
    seeds: {
      // extension: 'ts',
      directory: './seeds/prod',
    },
  },

};
